package com.only4play.practice.report.core.model;

import com.only4play.codegen.support.constants.BaseEnum;
import com.only4play.practice.common.BizCodeEnum;
import lombok.Getter;

/**
 * @author mdy
 * * @date 2024/10/21
 */
@Getter
public enum ReportCodeEnum  implements BaseEnum<BizCodeEnum> {

    // 返回 0 代表成功
    CODE_SUCCESS(0,"成功"),

    NotFindError(10001, "未查询到信息"),
    SaveError(10002, "保存信息失败"),
    UpdateError(10003, "更新信息失败"),
    ValidateError(10004, "数据检验失败"),
    StatusHasValid(10005, "状态已经被启用"),
    StatusHasInvalid(10006, "状态已经被禁用"),
    SystemError(10007, "系统异常"),
    BusinessError(10008, "业务异常"),
    ParamSetIllegal(10009, "参数设置非法"),
    TransferStatusError(10010, "当前状态不正确，请勿重复提交"),
    NotGrant(10011,"没有操作该功能的权限，请联系管理员"),

    // 开启上传失败
    EnableError(20001,"开启上传失败，请检查配置"),


    ;


    private String name;

    private int code;

    private ReportCodeEnum(int code, String msg){
        this.code = code;
        this.name = msg;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getName() {
        return this.name;
    }
}

